1. Field of the Invention
The present invention relates to obfuscation and more specifically to obfuscating constants in a compiled binary.
2. Introduction
Computer software is first written as source code which is readable by a person trained to understand programming languages. Generally a compiler converts that source code to object code that contains a list of instructions controlling what a computer does. Unfortunately for commercial software vendors who wish to enforce licensing or Digital Rights Management (DRM) provisions, or other software control schemes, malicious or mischievous individuals with enough time and resources can reverse engineer critical portions of the binary code. Reverse engineering allows for discovery of how a program operates. One technique to reverse engineer object code is to load the executable into memory and examine the memory contents with a piece of software called a debugger to locate the critical portions of software enforcing the restrictions or storing a particular value. Once the appropriate portions of binary code are located and reverse engineered, the software may be modified to perform in a manner not anticipated by the software vendor, potentially bypassing DRM or licensing restrictions, but also potentially causing great harm or injury. For example, a malicious reverse engineer could alter legitimate code to include a virus or could alter operating software for dangerous machinery to disregard safety protocols.
While it is impossible to design a software protection scheme that is invulnerable to reverse engineering, the goal is not to create an impenetrable barrier. The goal is to raise the cost of reverse engineering so high that the perceived cost of reverse engineering outweighs the expected benefit. Accordingly, what is needed in the art is an improved way to store and execute compiled software in a computing device while making the software difficult to reverse engineer and making needed constants difficult to extract from the binary.